package com.yyfax.ph.common.scan.idcard.activity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 项目名称：yjyc1.1.0
 * 类描述：
 * 创建人：xiongyufeng
 * 创建时间：2016/12/22 9:53
 * 修改人：xiongyufeng
 * 修改时间：2016/12/22 9:53
 * 修改备注：
 */
public class IdCardInfo implements Parcelable {

	private String name;
	private String idNumber;//身份证号码
	private String nationality;//名族
	private String address;
	private String authority;//签发机关
	private String validity;//有效期
	private String sex;
	private String filePath;

	private String idFrontHeaderImgPath = "";
	private String idFrontImgPath = "";
	private String idBackImgPath = "";

	public IdCardInfo(String name, String idNumber, String nationality,
					  String address, String authority, String validity,
					  String sex, String filePath, String idFrontHeaderImgPath, String idFrontImgPath, String idBackImgPath) {
		this.name = name;
		this.idNumber = idNumber;
		this.nationality = nationality;
		this.address = address;
		this.authority = authority;
		this.validity = validity;
		this.sex = sex;
		this.filePath = filePath;
		this.idFrontHeaderImgPath = idFrontHeaderImgPath;
		this.idFrontImgPath = idFrontImgPath;
		this.idBackImgPath = idBackImgPath;
	}

	public IdCardInfo() {
	}

	protected IdCardInfo(Parcel in) {
		name = in.readString();
		idNumber = in.readString();
		nationality = in.readString();
		address = in.readString();
		authority = in.readString();
		validity = in.readString();
		sex = in.readString();
		filePath = in.readString();
		idFrontHeaderImgPath = in.readString();
		idFrontImgPath = in.readString();
		idBackImgPath = in.readString();
	}


	@Override
	public void writeToParcel(Parcel parcel, int i) {
		parcel.writeString(name);
		parcel.writeString(idNumber);
		parcel.writeString(nationality);
		parcel.writeString(address);
		parcel.writeString(authority);
		parcel.writeString(validity);
		parcel.writeString(sex);
		parcel.writeString(filePath);
		parcel.writeString(idFrontHeaderImgPath);
		parcel.writeString(idFrontImgPath);
		parcel.writeString(idBackImgPath);
	}

	public static final Creator<IdCardInfo> CREATOR = new Creator<IdCardInfo>() {
		@Override
		public IdCardInfo createFromParcel(Parcel in) {
			return new IdCardInfo(in);
		}

		@Override
		public IdCardInfo[] newArray(int size) {
			return new IdCardInfo[size];
		}
	};

	public String getValidity() {
		return validity;
	}

	public void setValidity(String validity) {
		this.validity = validity;
	}

	public String getAuthority() {
		return authority;
	}

	public void setAuthority(String authority) {
		this.authority = authority;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getNationality() {
		return nationality;
	}

	public void setNationality(String nationality) {
		this.nationality = nationality;
	}

	public String getIdNumber() {
		return idNumber;
	}

	public void setIdNumber(String idNumber) {
		this.idNumber = idNumber;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getFilePath() {
		return filePath;
	}

	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}

	public String getIdFrontHeaderImgPath(){
		return idFrontHeaderImgPath;
	}

	public void setIdFrontHeaderImgPath(String idFrontHeaderImgPath){
		this.idFrontHeaderImgPath = idFrontHeaderImgPath;
	}

	public String getIdFrontImgPath(){
		return idFrontImgPath;
	}

	public void setIdFrontImgPath(String idFrontImgPath){
		this.idFrontImgPath = idFrontImgPath;
	}

	public String getIdBackImgPath(){
		return idBackImgPath;
	}

	public void setIdBackImgPath(String idBackImgPath){
		this.idBackImgPath = idBackImgPath;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	@Override
	public String toString() {
		return "IdCardInfo{" +
				"name='" + name + '\'' +
				", idNumber='" + idNumber + '\'' +
				", nationality='" + nationality + '\'' +
				", address='" + address + '\'' +
				", authority='" + authority + '\'' +
				", validity='" + validity + '\'' +
				", sex='" + sex + '\'' +
				", filePath='" + filePath + '\'' +
				'}';
	}

	@Override
	public int describeContents() {
		return 0;
	}


}